<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@page import="entity.DetailRoomE"%>
<%@page import="entity.Room"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="model.Action"%>
<%

            String key = request.getParameter("key");
            String value = request.getParameter("value");
            if (key.equals("username")) {
                
                if (Action.checkUsername(value)) {%>
<span id="a1"><img alt=""  src="/quanlyphonghoc/images/true.png" /></span>
    <%} else {%>
<span id="a1"><img alt=""  src="/quanlyphonghoc/images/false.png" /></span>
    <%}
                }
                if (key.equals("pass")) {
                    String pass2=request.getParameter("pass2");
                if (!value.equals(pass2)) {%>
<span id="a2"><img alt=""  src="/quanlyphonghoc/images/false.png" /></span>
    <%} else {%>
<span id="a2"><img alt=""  src="/quanlyphonghoc/images/true.png" /></span>
<%}
            }
                if (key.equals("email")) {
                    
                if (Action.checkemail(value)) {%>
<span id="a3"><img alt=""  src="/quanlyphonghoc/images/true.png" /></span>
    <%} else {%>
<span id="a3"><img alt=""  src="/quanlyphonghoc/images/false.png" /></span>
<%}
            }
                if (key.equals("local")) {

               
                    String idLocal=request.getParameter("idLocal");
                    Room room= new Room();
                    room.setIdLocal(idLocal);
                    ResultSet rs= room.selectDB();
                    %>
 <span id="roomax">
     <select name="room" class="width" id="room"  onclick="Change2()" >
                  <% while(rs.next()){ %>
                  <option value="<%=rs.getString(1) %>"><%=rs.getString(2) %></option>
                  <%} %>
              </select>
                </span>
               
    <%}
                

        %>